﻿<div ng-controller="merchantBankCardController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li>银行卡</li>
            </ol>
        </div>
    </div>

    <form class="form-horizontal row">
        <div class="form-group">
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">昵称</label>
                <div class="col-sm-8">
                    <input name="nick_name" type="text" class="form-control input-sm" ng-model="query.nick_name" placeholder="昵称/账号">
                </div>
            </div>
            <div class="col-sm-3">
                <label class="col-sm-3 control-label">时间</label>
                <div class="col-sm-9">
                    <div date class="input-group date">
                        <input class="form-control input-sm" ng-model="query.begin_time">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>

                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <label class="col-sm-1 control-label">至</label>
                <div class="col-sm-9">
                    <div date class="input-group date">
                        <input class="form-control input-sm" ng-model="query.end_time">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">状态</label>
                <div class="col-sm-8">
                    <div class="col-sm-12">
                        <select name="status" class="form-control input-sm" ng-model="query.status">
                            <option value="">请选择</option>
                            <option value="1">待审核</option>
                            <option value="2">自动审核通过</option>
                            <option value="3">审核通过</option>
                            <option value="4">审核不通过</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">户名</label>
                <div class="col-sm-8">
                    <input name="account_name" type="text" class="form-control input-sm" ng-model="query.account_name">
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-4">
                <div class="col-sm-offset-4 col-sm-8">
                    <button class="btn btn-primary btn-sm" ng-click="search()"><i class="fa fa-search"></i> 查询</button>
                </div>
            </div>
        </div>
    </form>
    <table style="table-layout:fixed;" class="table table-hover m-t-md">
        <thead>
            <tr style="background-color: #f7f7f9;">
                <th>序号</th>
                <th>昵称</th>
                <th>账号</th>
                <th>户名</th>
                <th>银行卡号</th>
                <th>银行名称</th>
                <th>支行名称</th>
                <th>提交时间</th>
                <th>状态</th>
                <th width="130">操作</th>
            </tr>
        </thead>
        <tbody ng-repeat="item in model.rows">
            <tr>
                <td>{{$index+1}}</td>
                <td>{{item.merchant.name}}</td>
                <td>{{item.merchant.mobile}}</td>
                <td>{{item.account_name}}</td>
                <td style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-height:30px;width:100%;display:inline-block;">{{item.account_num}}</td>
                <td>{{item.bank_name}}</td>
                <td>{{item.branch_name}}</td>
                <td>{{item.update_time}}</td>
                <td style="{{item.status == 1 || item.status == 2 ? '':item.status == 3 ? 'color:#0000ff':'color:#ff0000'}}">{{item.status_title}}</td>
                <td>
                    <a ng-if="item.status == 1 || item.status == 2" class="btn btn-primary btn-xs" ui-sref="app.merchantBankCard.detail({id:{{item.id}}})"><i class="fa fa-cog"></i>审核</a>
                    <a ng-if="item.status == 3 || item.status == 4" class="btn btn-primary btn-xs" ui-sref="app.merchantBankCard.detail({id:{{item.id}}})"><i class="fa fa-cog"></i>查看</a>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="row">
        <div class="col-md-12">
            <uib-pagination total-items="model.total_result" items-per-page="model.size" ng-model="model.page" num-pages="model.total_pages"
                            ng-change="search_page(model.page)" class="pagination-sm" boundary-links="true" boundary-link-numbers="true" max-size="20"
                            previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
            <span class="pull-right" style="margin: 30px 0px 20px 0px">共{{model.total_result}} 当前：{{model.page}}/{{model.total_pages}}</span>
        </div>
    </div>
</div>
